<section id="myself" class="sec-pad">
	<div th:switch="${authorized}" class="ms-img">
		<a th:case="'true'" href="javascript:;" id="modifyavatar-overlay" >		  
		   <img src="http://placehold.it/210x210"
			    th:src="@{${profile.avatar}}" height="210px" width="210px"/>
	    </a>
		<a th:case="*" href="javascript:;" >		  
		   <img src="http://placehold.it/210x210"
			    th:src="@{${profile.avatar}}" />
	    </a>
	    <p th:style="'width : 50%; margin : auto'" th:if="${hintAvatar == 'true' and authorized == 'true'}"><small>点击头像可修改</small></p>
	</div>
	<!--/*-->
	<div class="ms-level level">
		<span> <b><i class="fa fa-mars"></i></b> <s> <i
				class="fa fa-sun-o"></i> <i class="fa fa-moon-o"></i> <i
				class="fa fa-moon-o"></i> <i class="fa fa-star-o"></i> <i
				class="fa fa-star-o"></i>
		</s>
		</span>	
		<span>
		   <a href="javascript:;" class="edit-btn">修改头像<i class="fa fa-camera"></i>
		   </a>
		</span>
	</div>								
	<!--*/-->
	<div class="ms-info">
		<a th:if="${authorized == 'true'}" href="javascript:;" onclick="javascript:showModifyName();return false;"><strong class="ms-name"><span
			th:text="${profile.name}">Batman</span></strong>
		</a>
		<a th:if="${authorized != 'true'}" href="javascript:;" ><strong class="ms-name"><span
			th:text="${profile.name}">Batman</span></strong>
		</a>
		<form th:if="${authorized == 'true'}" id="modifyname-form" action="#">       
                <div class="form-group">
                    <div class="form-input mt10">
                        <div class="input-group">
                            <input type="text" name="name" id="modifyname-input" placeholder="您的新昵称"/>
                        </div>
                    </div>
                </div>	
                <div class="form-group mt10">
                    <input th:onclick="'javascript:modifyName(\'' + @{/users/} + ${profile.id} + '/name\',\'' + @{/users/} + ${profile.id} + '\');return false;'"
                           type="submit" value="确认" id="modifyname_btn" />
                </div>  
        </form> 
        
		<p>
			个性签名：<span class="edit" th:text="${profile.signature == null? '嘿，写点什么吧' : profile.signature}">打不死的小强</span>
		</p>
		<a th:if="${authorized == 'true'}" class="edit-btn" href="javascript:;" onclick="javascript:showModifySignature();return false;">
		    <i class="fa fa-pencil-square-o"></i>
		</a>
		<form th:if="${authorized == 'true'}" id="modifySignature-form" action="#">       
                <div class="form-group">
                    <div class="form-input mt10">
                        <div class="input-group">
                            <input type="text" name="signature" id="modifySignature-input" placeholder="您的新签名"/>
                        </div>
                    </div>
                </div>	
                <div class="form-group mt10">
                    <input th:onclick="'javascript:modifySignature(\'' + @{/users/} + ${profile.id} + '/signature\',\'' + @{/users/} + ${profile.id} + '\');return false;'"
                           type="submit" value="确认" id="modifySignature_btn" />
                </div>  
        </form> 
        
		<!--/*-->
		<strong class="change-password"><a href="#">修改密码</a></strong>
		<!--*/-->
		<a href="" th:href="@{/post/add}"><strong class="ms-name" style="border-radius:6px;margin-top:5px"><span >我要投稿</span></strong></a>
		<a href="" th:href="@{/post/myblogs}"><strong class="ms-name" style="border-radius:6px;margin-top:5px"><span >我的稿件</span></strong></a>
		<p>
			上次登录：<span class="edit"
				 th:text="${#calendars.format(profile.lastLogin,'yyyy.MM.dd')}">2015.03.12</span>
		        <!--/*-->
				<a
				href="#" class="edit-btn"><i class="fa fa-pencil-square-o"></i></a>							
		        <!--*/-->
		</p>
		
		<p th:if="${authorized == 'true'}" >
			Email：<span th:text="${profile.email}">123456@qq.com</span>
		</p>
		
		<div th:if="${authorized != 'true'}">
           <div th:switch="${isUserFollowed}" th:remove="tag">
				<a href="#" id="usercenter_follow_btn" class="button"
					th:onclick="'javascript:pro_unfollow(\'' + @{/fl/unfollow} + '\',\'' + ${profile.id} + '\',\'' + ${userId} + '\',\'0\',\'user_follow_span\',\'usercenter_follow_btn\',\'user_follow_i\');return false;'"
					th:case="'true'"> <i id="user_follow_i"
					class="fa fa-heart"></i><span id="user_follow_span"
					th:inline="text"><font>已关注([[${userFollowedCount}]])</font></span>
				</a> 
				<a href="#" id="usercenter_follow_btn" class="button"
					th:onclick="'javascript:pro_follow(\'' + @{/fl/follow} + '\',\'' + ${profile.id} + '\',\'' + ${userId} + '\',\'0\',\'user_follow_span\',\'usercenter_follow_btn\',\'user_follow_i\');return false;'"
					th:case="*"> <i id="user_follow_i" class="fa fa-heart-o"></i><span
					id="user_follow_span" th:inline="text"><font>关注([[${userFollowedCount}]])</font></span>
				</a>
		   </div>
		</div>	
	</div>
</section>